.main-container {
  min-height: 100%;
  transition: margin-left .28s;
  margin-left: $sideBarWidth;
  position: relative;
}

.sidebar-container {
  transition: width 0.28s;
  width: $sideBarWidth !important;
  background-color: $menuBg;
  position: fixed;
  font-size: 0px;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  .el-menu-item{
    height: 50px;
    line-height: 50px;
  }
  // reset element-ui css
  .horizontal-collapse-transition {
    transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
  }

  .scrollbar-wrapper {
    overflow-x: hidden !important;
  }

  .el-scrollbar__bar.is-vertical {
    right: 0px;
  }

  .el-scrollbar {
    height: 100%;
  }
  .sidebar-logo-container{
    display: none;
    &.has-logo {
      display: block;
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }
  }
  

  .is-horizontal {
    display: none;
  }

  a {
    display: inline-block;
    width: 100%;
    overflow: hidden;
  }

  .svg-icon {
    margin-right: 16px;
  }

  .sub-el-icon {
    margin-right: 12px;
    margin-left: -2px;
  }
  .scrollbar-wrapper{
    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
      .is-active{
        background-color: $menuHover!important;
        color: #fff!important;
      }
    }
  }
  
  // menu hover
  .submenu-title-noDropdown,
  .el-submenu__title,
  .el-menu-item {
    color: #c5c5c5!important;

    &:hover {
      background-color: $menuHover !important;
    }
  }

  .is-active>.el-submenu__title {
    color: $subMenuActiveText !important;
  }

  & .nest-menu .el-submenu>.el-submenu__title,
  & .el-submenu .el-menu-item {
    min-width: $sideBarWidth !important;
    background-color: $subMenuBg !important;

    &:hover {
      background-color: $subMenuHover !important;
    }
  }
}

.hideSidebar {
  .sidebar-container {
    width: 54px !important;
  }

  .main-container {
    margin-left: 54px;
  }

  .submenu-title-noDropdown {
    padding: 0 !important;
    position: relative;

    .el-tooltip {
      padding: 0 !important;

      .svg-icon {
        margin-left: 20px;
      }

      .sub-el-icon {
        margin-left: 19px;
      }
    }
  }

  .el-submenu {
    overflow: hidden;

    &>.el-submenu__title {
      padding: 0 !important;

      .svg-icon {
        margin-left: 20px;
      }

      .sub-el-icon {
        margin-left: 19px;
      }

      .el-submenu__icon-arrow {
        display: none;
      }
    }
  }

  .el-menu--collapse {
    .el-submenu {
      &>.el-submenu__title {
        &>span {
          height: 0;
          width: 0;
          overflow: hidden;
          visibility: hidden;
          display: inline-block;
        }
      }
    }
  }
}
.el-submenu__title{
  .el-submenu__icon-arrow{
    color: #fff;
  }
}

.el-menu--collapse .el-menu .el-submenu {
  min-width: $sideBarWidth !important;
}

// mobile responsive
.mobile {
  .main-container {
    margin-left: 0px;
  }

  .sidebar-container {
    transition: transform .28s;
    width: $sideBarWidth !important;
  }

  &.hideSidebar {
    .sidebar-container {
      pointer-events: none;
      transition-duration: 0.3s;
      transform: translate3d(-$sideBarWidth, 0, 0);
    }
  }
}

.withoutAnimation {

  .main-container,
  .sidebar-container {
    transition: none;
  }
}

// when menu collapsed
.el-menu--vertical {
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
  }

  .nest-menu .el-submenu>.el-submenu__title,
  .el-menu-item {
    &:hover {
      // you can use $subMenuHover
      background-color: $menuHover !important;
    }
  }

  // the scroll bar appears when the subMenu is too long
  >.el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}

// 头部通栏 适用网页
// $headerBannerBgColor: rgb(84, 92, 100);
// $headerBannerColor: #fff;
$headerBannerBgColor: $baseColor;
$headerBannerColor: #fff;
$menuActive:#f1b44d;
.app-wrapper{
  // 左右结构 适用系统
  .setting-layout-headerBanner-0{
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
    .system-menu{
      bottom:50px;
      .hamburger-container{
        height:50px;
        line-height:50px;
        cursor:pointer;
        background-color: $menuBg;
        text-align: center;
        .hamburger{
          stroke:#fff;
        }
      }
    }
    .headerBanner-header{
      width:100%;
    }
    .headerBanner-content{
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      top: 50px;
      .sidebar-container{
        top: 50px;
      }
      .app-main{
        position: absolute;
        top: 34px;
        right: 0;
        left: 0;
        bottom: 0;
        overflow: auto;
      }
    }
  }

  // 头部通栏 适用系统
  .setting-layout-headerBanner-1 {
    .tags-view-container{
      top:51px;
    }
    .system-header{
      height:84px;
    }
  }

  // 头部通栏 适用网页
  .setting-layout-headerBanner-2 {
    &.fixed-nav{
      .fixed-header{
        width: 100%;
      }
      .app-main{
        position:absolute;
        top: 50px;
        left:0;
        right:0;
        bottom:0;
        overflow:auto;
      }
    }
    .main-container{
      margin: 0;
    }
    .headerBanner-header{
      box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
      background-color: $headerBannerBgColor;
      .navbar{
        box-shadow:none;
        width: 1200px;
        margin: 0 auto;
        background-color: $headerBannerBgColor;
      }
      .avatar-container{
        color:#fff!important;
      }
      .sidebar-container{
        width: auto !important;
        position:static;
        display:inline-block;
        margin: 0 auto;
        background: $headerBannerBgColor;
        .sidebar-logo-container{
          background: $headerBannerBgColor;
        }
        .el-menu{
          background: $headerBannerBgColor!important;
          .el-submenu__title,
          .el-menu-item{
            background-color: $headerBannerBgColor!important;
            color: $headerBannerColor!important;
            height:50px;
            line-height: 50px;
            padding: 0 20px !important;
            .svg-icon{
              display:none;
            }
          }
          .is-active{
            color: $menuActive!important;
            border-bottom: 2px solid $menuActive!important;
            .el-submenu__title{
              color: $menuActive!important;
              border-bottom: 2px solid $menuActive!important;
            }
          }
        }
        .el-menu--horizontal{
          &>div{
            float:left;
          }
        }
      }
      .main-container {
        margin-left: 0;
      }
    }
  }
}
.el-menu--horizontal{
  .el-menu{
    background-color: $headerBannerBgColor!important;
    .el-menu-item,
    .el-submenu__title{
      background-color: $headerBannerBgColor!important;
      color: $headerBannerColor!important;
    }
  }
}
